<?
	if (!checkReg() OR !checkPrivAdmin()) {
		header("Location: /login/");
		exit;
	}

		$id 					= intval($_REQUEST['id']);
		$del 					= intval($_REQUEST['del']);
		$real_delete 	= intval($_REQUEST['real_delete']);

		if ($id AND checkPrivAdmin()) {

			$news_old = getOneRow($TABLE_PREFIX, "id=$id");

			if (is_array($news_old)) {

				if ($real_delete) {

					deleteFrom($TABLE_PREFIX, "id=$id");

					Header("Location: /insky/$TABLE_PREFIX/");
					exit();

				}		

			} else {

				Header("Location: /insky/$TABLE_PREFIX/");
				exit();
			}

		}

?>